package com.iraeta.entity.main.type;

public class SrmMessageType {
    public static final int caiGouOrder = 1;
    public static final int faHuoOrder = 2;
    public static final int shouHuoOrder = 3;
    public static final int qingGouOrder = 4;

    public static String getSrmMessageTypeStr(int status){
        String res = "未知";
        switch (status){
            case caiGouOrder:
                res = "采购订单";
                break;
            case faHuoOrder:
                res = "发货订单";
                break;
            case shouHuoOrder:
                res = "收货订单";
                break;
            case qingGouOrder:
                res = "请购订单";
                break;
            default:
                break;
        }
        return res;
    }
    public static String getSrmMessageTypeStr2(int status){
        String res = "";
        switch (status){
            case caiGouOrder:
                res = "CAIGOU_MSG_PROCUREMENT_ORDER_CREATED";
                break;
            case faHuoOrder:
                res = "CAIGOU_MSG_PROCUREMENT_SEND_GOODS_ACTION";
                break;
            case shouHuoOrder:
                res = "CAIGOU_MSG_PROCUREMENT_RECEIVEGOODS_ACTION";
                break;
            default:
                break;
        }
        return res;
    }
    public static int getSrmMessageTypeInt(String messageTypeStr){
        int res = 0;
        switch (messageTypeStr){
            case "CAIGOU_MSG_PROCUREMENT_ORDER_CREATED":
                res = caiGouOrder;
                break;
            case "CAIGOU_MSG_PROCUREMENT_SEND_GOODS_ACTION":
                res = faHuoOrder;
                break;
            case "CAIGOU_MSG_PROCUREMENT_RECEIVEGOODS_ACTION":
                res = shouHuoOrder;
                break;
            case "CAIGOU_MSG_BUYER_REQUISITION_CREATE_SUCCESS":
                res = qingGouOrder;
                break;
            default:
                break;
        }
        return res;
    }
}
